#pragma once
#include "MyProccess.h"
#include "PaintHelper.h"
#include "StringHelper.h"
#include <iostream>   
#include <string.h>
using   namespace   std; 

#define SJF 0
#define RR 1
#define Priority 2
//#define proccessNum 5
class MySchedule
{
private:
	int runTime;
	int initPosX;
	int initPosY_1;
	int height;
	int initPosY_2;
	int increaseX;
	PaintHelper *mPaintHelper;

	//int historyProccess[100];

public:
	MySchedule(void);
	~MySchedule(void);

	void startSchedule(int type,MyProccess *mps,HDC hdc,HWND hwnd,int RRpram=3);
	int startSJF(MyProccess *,int currentTime,HDC hdc);
	int startRR(MyProccess *,int,int,HDC hdc);
	int startPriority(MyProccess *,HDC hdc);
	
	bool init(MyProccess *);
	bool checkFinished(MyProccess *);
	bool checkArrival(MyProccess,int currentTime);
	bool paint(MyProccess *);
	void drawTitle(int type,int x,int y,PaintHelper *ph,int RRparam=3);
};

